Ifdef all mentions of navigationpanehelper out of non-Windows builds
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 19 Dec 2022 14:54:55 +0000 (15:54 +0100)
committerJyrki Gadinger <nilsding@nilsding.org>
Tue, 15 Apr 2025 11:59:22 +0000 (13:59 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/accountsettings.cpp
src/gui/accountsetupfromcommandlinejob.cpp
src/gui/folderman.h
src/gui/generalsettings.cpp
src/gui/owncloudsetupwizard.cpp

index 65b8b7badc0d4566a4a7c3296ce6fe91ff507b7a..551d60450575ca8c9bff3e8075ff7f6699637eeb 100644 (file)
@@ -839,9 +839,11 @@ void AccountSettings::slotFolderWizardAccepted()
      */
     definition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
 
+#ifdef Q_OS_WIN
     if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
         definition.navigationPaneClsid = QUuid::createUuid();
     }
+#endif
 
     const auto selectiveSyncBlackList = folderWizard->property("selectiveSyncBlackList").toStringList();
 
@@ -937,8 +939,10 @@ void AccountSettings::slotEnableVfsCurrentFolder()
             return;
         }
 
+#ifdef Q_OS_WIN
         // we might need to add or remove the panel entry as cfapi brings this feature out of the box
         FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
+#endif
 
         // It is unsafe to switch on vfs while a sync is running - wait if necessary.
         const auto connection = std::make_shared<QMetaObject::Connection>();
@@ -1014,8 +1018,10 @@ void AccountSettings::slotDisableVfsCurrentFolder()
             return;
         }
 
+#ifdef Q_OS_WIN
         // we might need to add or remove the panel entry as cfapi brings this feature out of the box
         FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
+#endif
 
         // It is unsafe to switch off vfs while a sync is running - wait if necessary.
         const auto connection = std::make_shared<QMetaObject::Connection>();
index eeff0cfb00a319d1207d9b4dbf751a8c130b953b..dd0f4066f234652aceda907bd092ac813447358d 100644 (file)
@@ -176,9 +176,11 @@ void AccountSetupFromCommandLineJob::setupLocalSyncFolder(AccountState *accountS
     definition.ignoreHiddenFiles = folderMan->ignoreHiddenFiles();
     definition.alias = folderMan->map().size() > 0 ? QString::number(folderMan->map().size()) : QString::number(0);
 
+#ifdef Q_OS_WIN
     if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
         definition.navigationPaneClsid = QUuid::createUuid();
     }
+#endif
 
     folderMan->setSyncEnabled(false);
 
index 8bb71b7325f9141eb2a57f97dd1f937e74302e9e..b76ede8da3f1684cd5cd46d9caf7efd3675e423c 100644 (file)
@@ -149,7 +149,10 @@ public:
     static QString unescapeAlias(const QString &);
 
     SocketApi *socketApi();
+
+#ifdef Q_OS_WIN
     NavigationPaneHelper &navigationPaneHelper() { return _navigationPaneHelper; }
+#endif
 
     /**
      * Check if @a path is a valid path for a new folder considering the already sync'ed items.
index bc5c5fbda5c1d52dabfdd4ac728bbbdceebeb7b9..d9d0b5d2c45eeb689917131fe829f00cfe239a2f 100644 (file)
@@ -580,8 +580,11 @@ void GeneralSettings::slotShowInExplorerNavigationPane(bool checked)
 {
     ConfigFile cfgFile;
     cfgFile.setShowInExplorerNavigationPane(checked);
+
+#ifdef Q_OS_WIN
     // Now update the registry with the change.
     FolderMan::instance()->navigationPaneHelper().setShowInExplorerNavigationPane(checked);
+#endif
 }
 
 void GeneralSettings::slotIgnoreFilesEditor()
index 633d8f6b7252e1618b5c7ef253a12e05442b56e7..50a5fce6cbd743bf63551d6c1b108df92eb5a6f7 100644 (file)
@@ -722,8 +722,12 @@ void OwncloudSetupWizard::slotAssistantFinished(int result)
                 folderDefinition.virtualFilesMode = bestAvailableVfsMode();
             }
 #endif
-            if (folderMan->navigationPaneHelper().showInExplorerNavigationPane())
+
+#ifdef Q_OS_WIN
+            if (folderMan->navigationPaneHelper().showInExplorerNavigationPane()) {
                 folderDefinition.navigationPaneClsid = QUuid::createUuid();
+            }
+#endif
 
             auto f = folderMan->addFolder(account, folderDefinition);
             if (f) {